﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Timers;
using System.Collections;
using YukiFX5017.Core;

namespace YukiFX5017
{
    public class Commands
    {
        public static void SendCommand(string themsg, Character MyChar, Client C)
        {
            string[] Splitter = themsg.Split(' ');
            if (themsg[0] == '@')
            {
                if (themsg == "@loc" || themsg.StartsWith("@loc"))
                {
                    C.Send(General.MyPackets.SendMsg(MyChar.UID, "SYSTEM", MyChar.Name, "Coords: " + MyChar.LocX + ", " + MyChar.LocY, 2000));
                }
                if (Splitter[0] == "@q")
                {
                    DataBase.LogoutSave(MyChar);
                    C.MySocket.Disconnect();
                }
            }
            else
            {
                //Not a command
            }
        }
    }
}
